package com.leizhou.controller;

import com.leizhou.pojo.Accunt;
import com.leizhou.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/*****
 * @Author: shenkunlin
 * @Date: 2019/7/11 10:49
 * @Description: com.changgou.controller
 ****/
@RestController
@RequestMapping(value = "/account")
public class AccountController {

    @Autowired
    private AccountService accountService;


    /***
     * 集合查询
     */
    @RequestMapping(value = "/list")
    public List<Accunt> list() {
        return accountService.list();
    }


    /***
     * 添加数据
     */
    @RequestMapping(value = "/add")
    public int add(Accunt accunt) {
        return accountService.add(accunt);
    }


    @RequestMapping(value = "/delete")
    public int delete(Accunt accunt) {
        return accountService.delete(accunt);
    }
}
